package com.healthy.mapper;

import com.healthy.entity.Consult;
import com.healthy.entity.TestInformation;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface ConsultMapper {
    //    查询所有
    @Select("select * from t_consult")
    List<Consult> culist();

    //    添加
    @Insert("insert into t_consult (name, examination, content,doctor) values ( #{consult.name}, #{consult.content}, #{consult.examination}, #{consult.doctor})")
    int cuInsert(@Param("consult") Consult consult);

    //删除
    @Delete("delete from t_consult where id = #{id}")
    int cuDeleteByid(int id);

    //修改
    @Update("update t_consult set name = #{name}, examination = #{content}, content = #{examination}, doctor = #{doctor} where id = #{id}")
    int cuUpdateByid(@Param("id") int id,@Param("name") String name,@Param("content") String content,@Param("examination") String examination,@Param("doctor") String doctor);
}
